*** Settings ***
Documentation  用户登录
Library    SeleniumLibrary

*** test cases ***
用户登录成功
    Open Browser    http://39.107.96.138:3000/  Chrome
    Click Element   xpath://*[@href="/signin"]
    Input Text  //*[@id="name"]     testuser1
    Input Text  //*[@id="pass"]     123456
    Click Element   xpath://*[@type="submit"]
    Element Text Should Be  //span[@class="user_name"]/a[@class="dark"]     testuser1
    Close Window

用户登录失败
    Open Browser    http://39.107.96.138:3000/  Chrome
    Click Element   xpath://*[@href="/signin"]
    Input Text  //*[@id="name"]     testuser0
    Input Text  //*[@id="pass"]     123456
    Click Element   xpath://*[@type="submit"]
    Element Text Should Be  //strong    用户名或密码错误
    Close Window